
package com.hlkj.pay.infrastructure.model.order;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableName;
import com.hlkj.framework.mybatis.core.dataobject.BaseDO;
import com.hlkj.pay.enums.PayOrderEnums;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author HlpayTeam
 * @date 2024/10/10 13:22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("t_order_refund")
public class RefundOrderDO extends BaseDO {

    /**
     * 退款订单号
     */
    @Schema(description = "退款订单号")
    private String refundOrderNo;
    /**
     * 退款订单号
     */
    @Schema(description = "商户退款订单号")
    private String mchRefundOrderNo;

    /**
     * 平台订单号
     */
    @Schema(description = "平台订单号")
    private String payOrderNo;
    /**
     * 平台订单号
     */
    @Schema(description = "商户订单号")
    private String mchOrderNo;

    /**
     * 商户通道编号
     */
    @Schema(description = "商户通道编号")
    private String mchChannelCode;

    /**
     * 商户商户号
     */
    @Schema(description = "商户商户号")
    private String sn;

    /**
     * 子商户号
     */
    @Schema(description = "子商户号")
    private String subSn;

    /**
     * 商户商户号
     */
    @Schema(description = "商户商户号")
    private String appId;

    /**
     * 默认服务商
     */
    @Schema(description = "默认服务商")
    private String providerCode;

    /**
     * 默认通道
     */
    @Schema(description = "默认通道")
    private String channelCode;
    
    /**
     * 支付方式
     */
    @Schema(description = "支付方式")
    private String payWayCode;

    /**
     * 商户通道拓展
     */
    @Schema(description = "商户通道拓展")
    private String channelConfig;
    

    /**
     * 退款原因
     */
    @Schema(description = "退款原因")
    private String refundReason;

    /**
     * 订单金额
     */
    @Schema(description = "订单金额")
    private BigDecimal amount;

    /**
     * 是否有退款，1 未退款 2 退款中 3 退款成功 4 退款完成
     * @see PayOrderEnums.REFUND_STATUS
     */
    @Schema(description = "是否有退款，1 未退款 2 退款中 3 退款成功 4 退款完成")
    private Integer refundStatus;

    /**
     * 本次退款金额
     */
    @Schema(description = "本次退款金额")
    private BigDecimal refundAmount;

    /**
     * 实际退款金额
     */
    @Schema(description = "实际退款金额")
    private BigDecimal actualRefundAmount;

    /**
     * 累计退款金额
     */
    @Schema(description = "累计退款金额")
    private BigDecimal totalRefundAmount;

    /**
     * 累计手续费退款金额
     */
    @Schema(description = "累计手续费退款金额")
    private BigDecimal totalFeeAmount;

    /**
     * 退款成功时间
     */
    @Schema(description = "退款成功时间")
    private Long successTime;

    /**
     * 渠道支付错误码
     */
    @Schema(description = "渠道支付错误码")
    private String bankCode;

    /**
     * 渠道支付错误描述
     */
    @Schema(description = "渠道支付错误描述")
    private String bankMsg;

    /**
     * 异步通知地址
     */
    @Schema(description = "异步通知地址")
    private String notifyUrl;

    /**
     * 向下游回调状态, 通知时间
     */
    @Schema(description = "向下游回调状态, 通知时间")
    private Long notifyTime;

    /**
     * 向下游回调状态, 0-未发送, 1-已发送'
     */
    @Schema(description = "向下游回调状态, 0-未发送,  1-已发送'")
    private Integer notifyState;

    /**
     * 签名方式 RSA2,MD5
     */
    @Schema(description = "签名方式 RSA2,MD5")
    private String signType;
}
